package com.hsg.lsn13.ac;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Gravity;
import android.view.Window;
import android.view.WindowManager;

import com.hsg.lsn13.manager.KeepManager;

public class KeepActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d("lsn13", "KeepActivity onCreate");
        Window window = getWindow();
        window.setGravity(Gravity.START | Gravity.TOP);
        WindowManager.LayoutParams attributes = window.getAttributes();
        attributes.width = 1;
        attributes.height = 1;
        attributes.x = 0;
        attributes.y = 0;
        window.setAttributes(attributes);


        KeepManager.getOurInstance().setKeep(this);//使用软引用 ，方便销毁回收对象内存
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.d("lsn13", "KeepActivity onDestroy");
    }
}
